import React from 'react';
import { loadMicroApp } from 'qiankun';
import Father from './Father'
export default function() {
  const handleClick = () => {
    console.log('点击');
    loadMicroApp({
      name: 'myvue',
      entry: '//localhost:7101',
      container: '#container',
      props: {
        slogan: 'Hello Qiankun',
        baseUrl: '/react16/vue',
      },
      activeRule:'/react16/vue'
    });
  }
  return (
    <h2 className="app-nav-item" style={{ borderColor: 'red' }}>
      <Father />
      <button onClick={handleClick}>加载微应用</button>
      <div id='container'></div>
    </h2>
  );
}
